package com.asa.hack;

public class D {

	/**
	 * 扫描脚本
	#!/bin/ bash
	function helptext {
	echo "enter the massnmap with the file input with list of IP addressranges"
	}
	if["$#" -ne 1 ]; then
	echo "Sorry cannot understand the command" helptext>&2
	exit 1
	elif [!-s $1 ]; then echo "ooops it is empty" helptext>&2
	exit 1
	fi
	
	if [ "$(id -u)"!= "0"]; then
	echo "I assume you are running as root" helptext>&2
	exit 1
	fi
	for range in $(cat $1); do
		store=$(echo $range | sed -e 's/\//_/g')
		echo "I am trying to create a store to dump now hangon"
		mkdir -p pwd/ $store;
		iptables -A INPUT -p tcp --dport 60000 -j DROP;echo -e " \n alright lets fire masscan ***★"
		masscan --open --banners --source-port 60000 -p0-65535 —-max-rate
	15000 -oBpwd/$store/masscan.bin $range; masscan --read$
			if [ ! -s ./results/$store/masscan-output.txt ]; then
				echo "Thank you for wasting time"
			else
			awk ' /open/ iprint $4,$3,$2,$1}' ./results/$store/masscan-
	output.txt | awk '
	/.+/{
	if(!($1 in val)) { Key [++i]= $1;}
	val [$1]= val [$1] $2 ", ";
	END{
	for(j=1;j<= i; j++){		printf("%s : %s \n%s"，
	Key[j],val [Key[j]]，(j-= i)? "": "\n" );
						} '>}./results/ $store/ hostsalive.csv
			for ips found in $ (cat ./results/$store/hostsalive.csv); do
				IP=$(echo $TARGET | awk -F: 'iprint $1}');
				PORT=$ (echo $TARGET | awk -F: '{print $2} ' l sed's/,$ / / ' );
				F工LENAME=$ (echo $IP l awk '{print "nmap_"$1} ');
				nmap -vv -sV --version-intensity 5 -sT -O --max-rate 5000 -Pn -T3 -
	p $PORT -oA ./results/$store/$FILENAME $IP;
		done
	fi
	done

	
	*/
	
	
}
